/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package org.redkalex.htdi.user;

import javax.persistence.*;
import org.redkale.convert.json.JsonConvert;
import org.redkale.util.Reproduce;
import org.redkalex.htdi.base.UserInfo;

/**
 * 完整的用户信息
 *
 * @author zhangjx
 */
public class UserDetail extends UserInfo {

    private static final Reproduce<UserInfo, UserDetail> reproduce = Reproduce.create(UserInfo.class, UserDetail.class);

    @Column(length = 128, comment = "邮箱激活码")
    protected String token = "";

    public UserInfo createUserInfo() {
        return reproduce.apply(new UserInfo(), this);
    }

    public String getToken() {
        return token;
    }

    public void setToken(String token) {
        this.token = token;
    }

    @Override
    public String toString() {
        return JsonConvert.root().convertTo(this);
    }
}
